package com.atguigu.gmall.product.service.impl;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.product.BaseTrademark;
import com.atguigu.gmall.product.mapper.BaseTradeMarkMapper;
import com.atguigu.gmall.product.service.BaseTradeMarkService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Service
public class BaseTradeMarkServiceImpl extends ServiceImpl<BaseTradeMarkMapper, BaseTrademark> implements BaseTradeMarkService {
    @Autowired
    private BaseTradeMarkMapper baseTradeMarkMapper;
    /**
     * 品牌分页
     * @param iPage
     * @return
     */
    @Override
    public IPage getTrademarkPage(IPage iPage) {
        QueryWrapper<BaseTrademark> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByDesc("id");
        IPage selectPage = baseTradeMarkMapper.selectPage(iPage, queryWrapper);
        return selectPage;
    }


}
